<template>
    <div class="yinying">
        <div class="tc">
            <div class="head">
                <div>{{tcdata.type}}</div>
                <img class="shoushou" @click="tuichutc" src="../assets/tc/close.png" alt="">
            </div>

            <img v-if='tcdata.icon==1'  class="ststuspng" src="../assets/tc/success.png" alt="">

            <img v-if='tcdata.icon==0' class="ststuspng" src="../assets/tc/error.png" alt="">

            <img v-if='tcdata.icon==2' class="ststuspng" src="../assets/tc/yiwen.png" alt="">

            <div class="ststuszi">{{tcdata.title}}!</div>

            <div class="btnbox" v-if='tcdata.isdel==true'>
                <div class="btn1 shoushou" @click="tuichutc" style="margin-right:20px;">取消</div>
                <div class="btn2 shoushou" @click="queding">确定</div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        props: {
            tcdata: {
                type: Object,
                default: ''
            },
        },
        methods: {
            
            tuichutc:function(){
                this.$emit('tuichutc','tuichu')
            },

            queding:function(){
                this.$emit('queding','queding')
            }
        }
    }
</script>

<style scoped>
.btn2{
    width:62px;
    height:26px;
    background:rgba(38,106,255,1);
    opacity:1;
    border-radius:4px;
    text-align: center;
    line-height: 26px;
    font-size:14px;
    font-weight:400;
    color:rgba(255,255,255,1);
}
.btn1{
    width:62px;
    height:26px;
    background:rgba(255,255,255,1);
    border:1px solid rgba(172,172,172,1);
    opacity:1;
    border-radius:4px;
    text-align: center;
    line-height: 26px;
    font-size:14px;
    font-weight:400;
    color:rgba(172,172,172,1);
}
.btnbox{
    margin-top: 20px;
    display: flex;
    /* margin-bottom: 24px; */
}
.ststuszi{
    margin-top: 20px;
    font-size:14px;
    
}
.ststuspng{
    margin-top: 7px;
}
.head{
    width:100%;
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size:20px;
    font-weight:550;
    line-height:28px;
    color:rgba(51,51,51,1);
}
.yinying{
    width: 100vw;
    height: 100vh;
    position: fixed;
    top:0;
    left:0;
}
.tc{
    position: absolute;
    top:50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width:394px;
    /* height:172px; */
    background:rgba(255,255,255,1);
    border:1px solid rgba(231,237,252,1);
    opacity:1;
    border-radius:4px;
    padding:16px 20px 45px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
}

</style>